<script src="../../resources/dump-as-markup.js"></script>
<div contentEditable id="test">
  <span id="start">start</span>
  editable-1
  <div contentEditable="false">
    <style>#end { color: red; }</style>
    <link type="foo" href="bar">
    uneditable
  </div>
  editable-2
<span id="end">end</span>
</div>
<script>
Markup.description('Test case for crash bug http://crbug.com/177470');
function $(id) { return document.getElementById(id); }
var range = document.createRange();
range.setStart($('start'), 0);
range.setEnd($('end'), NaN);
getSelection().addRange(range);
document.execCommand('delete', null, '');
Markup.dump($('test'));
</script>
